package com.jiyun.wait.controller;

import com.jiyun.pojo.Personal;
import com.jiyun.pojo.UserPassenger;
import com.jiyun.pojo.chat.ChatMessage;
import com.jiyun.result.Result;
import com.jiyun.wait.service.ChatMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("chat")
public class ChatMessageController {
    @Autowired
    private ChatMessageService chatMessageService;

    @RequestMapping("selectMessage")
    public Result selectMessage(@RequestBody ChatMessage chatMessage){
        return chatMessageService.selectMessage(chatMessage);
    }

    @RequestMapping("findPassenger")
    public Result findPassenger(@RequestBody Personal personal ){
        return chatMessageService.findPassenger(personal);
    }

}
